home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / back_to_work.swf / scripts / %3Cdefault package%3E / FComboBoxSymbol.as < prev    next >
Encoding:
Text File  |  2007-09-27  |  1.5 KB  |  52 lines

  1. function FComboBoxClass()
  2. {
  3.    _global._popUpLevel = _global._popUpLevel != undefined ? _global._popUpLevel + 1 : 20000;
  4.    this.superHolder = _root.createEmptyMovieClip("superHolder" + _popUpLevel,_popUpLevel);
  5.    var testContainer = this.superHolder.createEmptyMovieClip("testCont",20000);
  6.    var testBox = testContainer.attachMovie("FBoundingBoxSymbol","boundingBox_mc",0);
  7.    if(testBox._name == undefined)
  8.    {
  9.       this.superHolder.removeMovieClip();
  10.       this.superHolder = this._parent.createEmptyMovieClip("superHolder" + _popUpLevel,_popUpLevel);
  11.    }
  12.    else
  13.    {
  14.       testContainer.removeMovieClip();
  15.    }
  16.    if(this.rowCount == undefined)
  17.    {
  18.       this.rowCount = 8;
  19.       this.editable = false;
  20.    }
  21.    this.itemSymbol = "FComboBoxItemSymbol";
  22.    this.init();
  23.    this.permaScrollBar = false;
  24.    this.proxyBox_mc.gotoAndStop(1);
  25.    this.width = this._width;
  26.    this.height = this.proxyBox_mc._height * this._yscale / 100;
  27.    var i = 0;
  28.    while(i < this.labels.length)
  29.    {
  30.       this.addItem(this.labels[i],this.data[i]);
  31.       i++;
  32.    }
  33.    this.lastSelected = 0;
  34.    this.selectItem(0);
  35.    this._xscale = this._yscale = 100;
  36.    this.opened = false;
  37.    this.setSize(this.width);
  38.    this.highlightTop(false);
  39.    if(this.changeHandler.length > 0)
  40.    {
  41.       this.setChangeHandler(this.changeHandler);
  42.    }
  43.    this.onUnload = function()
  44.    {
  45.       this.superHolder.removeMovieClip();
  46.    };
  47.    this.setSelectedIndex(0,false);
  48.    this.value = "";
  49.    this.focusEnabled = true;
  50.    this.changeFlag = false;
  51. }
  52.